package com.dong.gmall.service.impl;

import com.dong.gmall.bean.UserAddress;
import com.dong.gmall.service.OrderService;
import com.dong.gmall.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 1. 服务提供者注册到注册中心
 *      1). 导入dobbu依赖
 *      2).
 * 2. 消费者去注册中心订阅服务地址
 */
@Service
public class OrderServiceImpl implements OrderService {
    @Autowired
    private UserService userService;
    public void initOrder(String userId) {
        //1 查询用户收货地址
        List<UserAddress> userAddressList = userService.getUserAddressList(userId);
        System.out.println(userAddressList);
    }
}
